<?php

abstract class Agitum_Orm_Attribute_Abstract
{
    private $_type;
    
    private $_name;
 	private $_title;
 	private $_readOnly;
 	private $_hidden = false;
 	private $_inGrid = false;
 	private $_isSearchable = false;
	private $_sortOrder = 1;
	
    public function __construct($opt = array()) 
    {
        if( isset($opt['name'])) $this->_ = $opt['name'];
        if( isset($opt['title'])) $this->_ = $opt['title'];
        if( isset($opt['readOnly'])) $this->_ = $opt['readOnly'];
        if( isset($opt['hidden'])) $this->_ = $opt['hidden'];
        if( isset($opt['inGrid'])) $this->_ = $opt['inGrid'];
        if( isset($opt['isSearchable'])) $this->_ = $opt['isSearchable'];
        if( isset($opt['sortOrder'])) $this->_ = $opt['sortOrder'];
    }
    
    public function getName() { return $this->_name; }
    public function setName($name) { $this->_name = $name; }
    
    public function getType() { return $this->_type; }
    public function setType($type) { $this->_type = $type; }
    
    public function getTitle() { return $this->_title; }
    public function setTitle($title) { $this->_title = $title; }
    
    public function getReadOnly() { return $this->_readOnly; }
    public function setReadOnly($readOnly) { $this->_readOnly = $readOnly; }
    
    public function getHidden() { return $this->_hidden; }
    public function setHidden($hidden) { $this->_hidden = $hidden; }
    
    public function getInGrid() { return $this->_inGrid; }
    public function setInGrid($inGrid) { $this->_inGrid = $inGrid; }
    
    public function getIsSearchable() { return $this->_isSearchable; }
    public function setIsSearchable($searchable) { $this->_isSearchable = $searchable; }
    
    public function getSortOrder() { return $this->_sortOrder; }
    public function setSortOrder($sortOrder) { $this->_sortOrder = $sortOrder; }
    
//    public abstract function render() {}
//    public abstract function validate() {}
    
}